<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport"
          content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
    <title>我的</title>
    <link rel="stylesheet" href="css/weui.min.css">
    <link rel="stylesheet" href="css/jquery-weui.css">
    <link rel="stylesheet" href="css/demos.css">
    <link rel="stylesheet" href="css/main.css">
</head>
<style>
    .weui-cells {
        margin-top: 0;
    }

    .yy {
        display: none;
    }

    .fankui {
        display: block;
        width: 350px;
        height: 100px;
        margin: 0 auto;
        resize: none;
        margin-top: 10px;
    }

    .help_title {
        line-height: 40px;
        background: #f4f4f4;
        color: #333;
        font-size: 16px;
        border-bottom: solid 1px #e1e2e3;
        padding: 0 20px;
    }

    .text {
        text-indent: 2em;
        font-size: 14px;
        color: #666;
        background: #fff;
        padding: 0 20px;
    }

    .help_list {
        padding: 0 10px;
        line-height: 40px;
        background: #fff;
        border-bottom: solid 1px #e1e2e3;
        color: #333;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .help_enter {
        width: 15px;
        height: 15px;
    }

    .help_h4 {
        text-align: center;
        font-size: 16px;
        color: #666;
        line-height: 40px;
    }
</style>

<body>
<div class="topNav">
    <a href="javascript:window.history.go(-1)"><img src="./images/xiangzuo.png" alt=""></a><p>常见问题</p>
</div>
<div class="block"></div>
<div id="sysQuestion">

</div>
<h4 class="help_h4">进行反馈</h4>
<div class="weui-cells weui-cells_form">
    <div class="weui-cell">
        <div class="weui-cell__bd">
            <textarea class="weui-textarea" placeholder="请输入文本" rows="3"></textarea>
           <!-- <div class="weui-textarea-counter"><span>0</span>/200</div>-->
        </div>
    </div>
</div>
<div class="weui-btn-area">
    <a class="weui-btn weui-btn_primary" href="javascript:" id="showTooltips">确定</a>
</div>
</body>
<script src="js/jquery-2.1.4.js"></script>
<script src="js/jquery-weui.js"></script>
<script src="wxJs/utils/contain.js"></script>
<script src="wxJs/utils/storage.js"></script>
<script>
    var userId = GetQueryString("userId");
    if (!userId) {
        window.history.back(-1);
    } else {
        $.post(getWeiContextPath() + "/wx/data/showSysQuestion", {}, function (res) {
            var _sysQuestion = $('#sysQuestion').empty();
            $.each(res, function (i, obj) {
                _sysQuestion.append('<a href="help_detail.html?id=' + obj.id +'">\n' +
                    '        <div class="help_list">\n' +
                    '            <p>' + obj.toQuestion + '</p>\n' +
                    '            <img src="./images/right.png" alt="" class="help_enter">\n' +
                    '        </div>\n' +
                    '    </a>')
            })
        })
    }

    $('#showTooltips').on('click', function () {
        var toQuestion = $('.weui-textarea').val();
        if (!toQuestion) {
            $.toast("请填写反馈", "forbidden");
            return false
        }
        $.post(getWeiContextPath() + "/wx/data/addUserQues", {toQuestion:toQuestion,wxUserId:userId,questionType:1}, function (res) {
            if(res.code==0){
                $.toast("提交成功",function(){
                    window.location.replace("me.html?userId="+userId)
                });

            }
        })
    })
</script>

</html>